home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWODUtil / Include / FWIText.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.4 KB  |  83 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWIText.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWITEXT_H
  11. #define FWITEXT_H
  12.  
  13. // --- Foundation includes ---
  14.  
  15. #ifndef FWSTRS_H
  16. #include "FWStrs.h"
  17. #endif
  18.  
  19. // ----- OpenDoc utilities -----
  20. #ifndef _ITEXT_
  21. #include "IText.h"
  22. #endif
  23.  
  24. #if FW_LIB_EXPORT_PRAGMAS
  25. #pragma lib_export on
  26. #endif
  27.  
  28. //========================================================================================
  29. // Constants
  30. //========================================================================================
  31.  
  32. #ifdef FW_BUILD_MAC
  33.     // On the Mac, script code of 0 is smRoman, and language code of 0 is English
  34.     #define FW_kDefaultScriptCode    0
  35.     #define FW_kDefaultLangCode        0
  36. #endif
  37.  
  38. #ifdef FW_BUILD_WIN
  39.     // [KVV] Is this correct for Windows?
  40.     #define FW_kDefaultScriptCode    0
  41.     #define FW_kDefaultLangCode        0
  42. #endif
  43.  
  44. //========================================================================================
  45. // Macro
  46. //========================================================================================
  47.  
  48. #ifdef FW_DEBUG
  49. #ifdef FW_BUILD_MAC
  50.     #define FW_CHECK_ODITEXT_FORMAT(I)    FW_ASSERT(I != NULL && (I)->format == kODTraditionalMacText)
  51. #endif
  52. #ifdef FW_BUILD_WIN
  53.     #define FW_CHECK_ODITEXT_FORMAT(I)    // [KVV]    Windows ???
  54. #endif
  55. #else
  56.     #define FW_CHECK_ODITEXT_FORMAT(I)    
  57. #endif
  58.  
  59. //========================================================================================
  60. // Global functions
  61. //========================================================================================
  62.  
  63. FW_FUNC_ATTR void                 SetITextString(ODIText* iText, const FW_CString& string);
  64. FW_FUNC_ATTR ODIText*             CreateITextString(const FW_CString& string);
  65.  
  66. //========================================================================================
  67. // Global functions
  68. //========================================================================================
  69.  
  70. inline FW_FUNC_ATTR void         SetITextString(ODIText* iText, const FW_CString& string)
  71.                                     {SetITextCString(iText,(char*)((const FW_Char*)string));}
  72.  
  73. inline FW_FUNC_ATTR ODIText*     CreateITextString(const FW_CString& string)
  74.                                     {return CreateITextCString(FW_kDefaultScriptCode, FW_kDefaultLangCode, (char*)((const FW_Char*)string));}
  75.  
  76. #if FW_LIB_EXPORT_PRAGMAS
  77. #pragma lib_export off
  78. #endif
  79.  
  80.  
  81.  
  82. #endif
  83.